Optimal. Leaf size=63 \[ \frac{a^2 c \cos (e+f x)}{f}+\frac{a^2 c \sin (e+f x) \cos (e+f x)}{2 f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{1}{2} a^2 c x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0898987, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {2966, 3770, 2638, 2635, 8} \[ \frac{a^2 c \cos (e+f x)}{f}+\frac{a^2 c \sin (e+f x) \cos (e+f x)}{2 f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{1}{2} a^2 c x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2966
Rule 3770
Rule 2638
Rule 2635
Rule 8
Rubi steps
\begin{align*} \int \csc (e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=\int \left (a^2 c+a^2 c \csc (e+f x)-a^2 c \sin (e+f x)-a^2 c \sin ^2(e+f x)\right ) \, dx\\ &=a^2 c x+\left (a^2 c\right ) \int \csc (e+f x) \, dx-\left (a^2 c\right ) \int \sin (e+f x) \, dx-\left (a^2 c\right ) \int \sin ^2(e+f x) \, dx\\ &=a^2 c x-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{a^2 c \cos (e+f x)}{f}+\frac{a^2 c \cos (e+f x) \sin (e+f x)}{2 f}-\frac{1}{2} \left (a^2 c\right ) \int 1 \, dx\\ &=\frac{1}{2} a^2 c x-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{a^2 c \cos (e+f x)}{f}+\frac{a^2 c \cos (e+f x) \sin (e+f x)}{2 f}\\ \end{align*}
Mathematica [A] time = 0.0841551, size = 61, normalized size = 0.97 \[ \frac{a^2 c \left (\sin (2 (e+f x))+4 \cos (e+f x)+4 \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )-4 \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )-2 e+2 f x\right )}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 78, normalized size = 1.2 \begin{align*}{\frac{{a}^{2}c\cos \left ( fx+e \right ) \sin \left ( fx+e \right ) }{2\,f}}+{\frac{{a}^{2}cx}{2}}+{\frac{{a}^{2}ce}{2\,f}}+{\frac{{a}^{2}c\cos \left ( fx+e \right ) }{f}}+{\frac{{a}^{2}c\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.973882, size = 99, normalized size = 1.57 \begin{align*} -\frac{{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c - 4 \,{\left (f x + e\right )} a^{2} c - 4 \, a^{2} c \cos \left (f x + e\right ) + 4 \, a^{2} c \log \left (\cot \left (f x + e\right ) + \csc \left (f x + e\right )\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.1364, size = 201, normalized size = 3.19 \begin{align*} \frac{a^{2} c f x + a^{2} c \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \, a^{2} c \cos \left (f x + e\right ) - a^{2} c \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + a^{2} c \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right )}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - a^{2} c \left (\int - \sin{\left (e + f x \right )} \csc{\left (e + f x \right )}\, dx + \int \sin ^{2}{\left (e + f x \right )} \csc{\left (e + f x \right )}\, dx + \int \sin ^{3}{\left (e + f x \right )} \csc{\left (e + f x \right )}\, dx + \int - \csc{\left (e + f x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16443, size = 150, normalized size = 2.38 \begin{align*} \frac{{\left (f x + e\right )} a^{2} c + 2 \, a^{2} c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - \frac{2 \,{\left (a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 2 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \, a^{2} c\right )}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 1\right )}^{2}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]